package com.teamsun.rptcfg;

import com.sun.org.apache.xpath.internal.operations.Bool;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 报表列信息基础类
 */
public class BaseRptColumn implements Serializable{

    /**
     * 列名
     */
    private String name;

    /**
     * 别名
     */
    private String aliasName;

    /**
     * SQL查询列名
     */
    private String field;

    /**
     * 列别名(如果该项不配置则默认将查询列的值转小写)
     */
    private String aliasField;

    /**
     * 列宽
     */
    private String width;

    /**
     * 列的对齐方式(可选 left/right/center)
     */
    private String align;

    /**
     * 该列是否是查询列(0-否  1-是)
     */
    private String isCondition;

    /**
     * 查询列类型(查询类型详情参见Constants类中的CONDITIONTYPE_*)
     */
    private String conditionType;

    /**
     * 页面展示日期格式化类型(只有查询类型为日期时该配置项才有意义)
     */
    private String formatter;

    /**
     * 数据库日期格式化类型(只有查询类型为日期时该配置项才有意义)
     */
    private String dbFormatter;

    /**
     * 数据库中日期的数据类型是否是日期类型(只有查询类型为日期时该配置项才有意义)
     * 0-否  1-是，默认为否
     * 动态生成SQL时，根据该配置决定是否需要加to_char函数
     */
    private String isDateType;

    /**
     * 查询类型(查询类型为输入框时该配置项才有意义 0-模糊查询 1-精确查询，默认模糊查询)
     */
    private String queryType;

    /**
     * 当列为查询列时，配置该查询选项是否必输(0-否  1-是)
     */
    private String isNeed;

    /**
     * 该列是否是冻结列(0-否  1-是)
     */
    private String isLock;

    /**
     * 该列是否是汇总列(0-否  1-是)
     */
    private String isSumCol;

    /**
     * 该列是否是计数列(0-否  1-是)
     */
    private String isCount;

    /**
     * 该列是否展示(0-否  1-是)
     */
    private String isShow;

    /**
     * 列属性(0-维度  1-指标)
     */
    private String colType;

    /**
     * 和嵌套SQL中的级联维度
     */
    private String innerDim;

    /**
     * 列是否下钻(0-否  1-是)
     */
    private String isDrill;

    /**
     * 查询条件的默认值
     */
    private String defaultValue;

    /**
     * 查询条件的默认值(区间值的结束值)
     */
    private String defaultValueEnd;

    /**
     * 查条件默认名称
     */
    private String defaultName;

    /**
     * 数字格式化方式
     */
    private String numberFormat;

    /**
     * 动态配置数字的格式化方式
     */
    private String dynamicFormat;

    /**
     * 计数方式
     */
    private String countType;

    /**
     * 通过和指定值比较，动态展示字体颜色
     */
    private String fontColorByValue;

    /**
     * 通过和指定值区间比较，动态展示字体颜色
     */
    private String fontColorByRange;

    /**
     * 通过和其他列的值比较，动态展示字体颜色
     */
    private String fontColorByRow;

    /**
     * 是否是SQL拼接列
     */
    private String isSQLColumn;

    /**
     * 是否是查询列
     */
    private String isQueryColumn;

    /**
     * 指标分类
     */
    private String group;

    /**
     * 类排序
     */
    private String isSort;

    /**
     * 维度是否选中
     */
    private String isSelect;

    /**
     * 查询条件所属层级
     */
    private String conditionLevel;

    /**
     * 级联维度
     */
    private String cascade;

    /**
     * 列单位
     */
    private String unit;

    private String cascadeDate;

    private String cascadeCondition;

    /**
     * 关联名称(树形组件或下拉框配置的都是编码信息，当报表下钻传参时通常需要指定报表列中的名称字段)
     * 如：机构通常配置为树新组件，此组件通常配置的是机构编码信息，报表列中通常都是机构名称，当报表
     * 需要下钻时，需要在树组件中指定机构编码对应的机构名称列，该属性的值为机构名称列的aliasField
     */
    private String relateName;

    /**
     * 查询时是否是or查询,用于配置(or (a and b))这种查询条件
     */
    private String isOrOperator;

    /**
     * 元素是否在页面显示
     */
    private String isVisibility;

    /**
     * 如果列查询类型是下拉框，维度值在文件中配置，用于保存下拉框的值
     */
    private Map<String, String> optionValue;

    /**
     * 多选下拉框默认值
     */
    private Map<String, Boolean> mutiSelectDefault;

    /**
     * 如果列查询类型是下拉框，且维度值来源于数据库，用于保存维度表信息
     */
    private SelectDim selectDim;

    /**
     * 如果列查询类型是树，用于保存维度表信息
     * 可配置多个树信息，如同时配置机构树、行政区划树，每个树在前台以TAB页的形式展示
     */
    private List<TreeDim> treeDims;

    private TreeDim treeDim;

    /**
     * 如果列需要下钻，用于保存下钻信息
     */
    private RptDrill rptDrill;

    /**
     * 如果列是查询列，且是查询类型是多tab树形控件时，该属性才有效
     * 0-只可以勾选单个tab的数控件(默认)
     * 1-可同时勾选多个tab的数控件
     */
    private String multiTreeMode;

    /**
     * 查询条件前端显示是否只读 1-只读 0-可编辑(自定义报表使用)
     */
    private String readOnly;

    /**
     * 自定义值(自定义报表时，用户自定义的默认值)
     */
    private String selfDefineValue;

    /**
     * 自定义值(自定义报表时，用户自定义的默认值)
     */
    private String selfDefineName;

    /**
     * 自定义值(自定义报表时，用户自定义的默认值)
     */
    private String selfDefineValueEnd;

    /**
     * 自定义值(自定义报表时，用户自定义的默认值)
     */
    private Map<String, Boolean> selfDefineMultiSelect;

    /**
     * 自定义报表 指标或维度是否选中
     */
    private String selfDefineSelect;

    /**
     * 日期控件配置的默认值
     */
    private String dateDefault;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAliasName() {
        return aliasName;
    }

    public void setAliasName(String aliasName) {
        this.aliasName = aliasName;
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getAliasField() {
        return aliasField;
    }

    public void setAliasField(String aliasField) {
        this.aliasField = aliasField;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }

    public String getAlign() {
        return align;
    }

    public void setAlign(String align) {
        this.align = align;
    }

    public String getIsCondition() {
        return isCondition;
    }

    public void setIsCondition(String isCondition) {
        this.isCondition = isCondition;
    }

    public String getConditionType() {
        return conditionType;
    }

    public void setConditionType(String conditionType) {
        this.conditionType = conditionType;
    }

    public String getFormatter() {
        return formatter;
    }

    public void setFormatter(String formatter) {
        this.formatter = formatter;
    }

    public String getIsNeed() {
        return isNeed;
    }

    public void setIsNeed(String isNeed) {
        this.isNeed = isNeed;
    }

    public String getIsLock() {
        return isLock;
    }

    public void setIsLock(String isLock) {
        this.isLock = isLock;
    }

    public String getColType() {
        return colType;
    }

    public void setColType(String colType) {
        this.colType = colType;
    }

    public Map<String, String> getOptionValue() {
        return optionValue;
    }

    public void setOptionValue(Map<String, String> optionValue) {
        this.optionValue = optionValue;
    }

    public String getIsSumCol() {
        return isSumCol;
    }

    public void setIsSumCol(String isSumCol) {
        this.isSumCol = isSumCol;
    }

    public String getIsShow() {
        return isShow;
    }

    public void setIsShow(String isShow) {
        this.isShow = isShow;
    }

    public String getQueryType() {
        return queryType;
    }

    public void setQueryType(String queryType) {
        this.queryType = queryType;
    }

    public String getDbFormatter() {
        return dbFormatter;
    }

    public void setDbFormatter(String dbFormatter) {
        this.dbFormatter = dbFormatter;
    }

    public SelectDim getSelectDim() {
        return selectDim;
    }

    public void setSelectDim(SelectDim selectDim) {
        this.selectDim = selectDim;
    }

    public List<TreeDim> getTreeDims() {
        return treeDims;
    }

    public void setTreeDims(List<TreeDim> treeDims) {
        this.treeDims = treeDims;
    }

    public TreeDim getTreeDim() {
        return treeDim;
    }

    public void setTreeDim(TreeDim treeDim) {
        this.treeDim = treeDim;
    }

    public String getIsDrill() {
        return isDrill;
    }

    public void setIsDrill(String isDrill) {
        this.isDrill = isDrill;
    }

    public RptDrill getRptDrill() {
        return rptDrill;
    }

    public void setRptDrill(RptDrill rptDrill) {
        this.rptDrill = rptDrill;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getNumberFormat() {
        return numberFormat;
    }

    public void setNumberFormat(String numberFormat) {
        this.numberFormat = numberFormat;
    }

    public String getIsQueryColumn() {
        return isQueryColumn;
    }

    public void setIsQueryColumn(String isQueryColumn) {
        this.isQueryColumn = isQueryColumn;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getDefaultName() {
        return defaultName;
    }

    public void setDefaultName(String defaultName) {
        this.defaultName = defaultName;
    }

    public String getIsSort() {
        return isSort;
    }

    public void setIsSort(String isSort) {
        this.isSort = isSort;
    }

    public String getIsSelect() {
        return isSelect;
    }

    public void setIsSelect(String isSelect) {
        this.isSelect = isSelect;
    }

    public String getConditionLevel() {
        return conditionLevel;
    }

    public void setConditionLevel(String conditionLevel) {
        this.conditionLevel = conditionLevel;
    }

    public String getCascade() {
        return cascade;
    }

    public void setCascade(String cascade) {
        this.cascade = cascade;
    }

    public String getIsCount() {
        return isCount;
    }

    public void setIsCount(String isCount) {
        this.isCount = isCount;
    }

    public String getDefaultValueEnd() {
        return defaultValueEnd;
    }

    public void setDefaultValueEnd(String defaultValueEnd) {
        this.defaultValueEnd = defaultValueEnd;
    }

    public String getDynamicFormat() {
        return dynamicFormat;
    }

    public void setDynamicFormat(String dynamicFormat) {
        this.dynamicFormat = dynamicFormat;
    }

    public String getIsSQLColumn() {
        return isSQLColumn;
    }

    public void setIsSQLColumn(String isSQLColumn) {
        this.isSQLColumn = isSQLColumn;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getCountType() {
        return countType;
    }

    public void setCountType(String countType) {
        this.countType = countType;
    }

    public String getCascadeDate() {
        return cascadeDate;
    }

    public void setCascadeDate(String cascadeDate) {
        this.cascadeDate = cascadeDate;
    }

    public String getIsVisibility() {
        return isVisibility;
    }

    public void setIsVisibility(String isVisibility) {
        this.isVisibility = isVisibility;
    }

    public String getCascadeCondition() {
        return cascadeCondition;
    }

    public void setCascadeCondition(String cascadeCondition) {
        this.cascadeCondition = cascadeCondition;
    }

    public String getIsDateType() {
        return isDateType;
    }

    public void setIsDateType(String isDateType) {
        this.isDateType = isDateType;
    }

    public String getInnerDim() {
        return innerDim;
    }

    public void setInnerDim(String innerDim) {
        this.innerDim = innerDim;
    }

    public String getIsOrOperator() {
        return isOrOperator;
    }

    public void setIsOrOperator(String isOrOperator) {
        this.isOrOperator = isOrOperator;
    }

    public String getRelateName() {
        return relateName;
    }

    public void setRelateName(String relateName) {
        this.relateName = relateName;
    }

    public Map<String, Boolean> getMutiSelectDefault() {
        return mutiSelectDefault;
    }

    public void setMutiSelectDefault(Map<String, Boolean> mutiSelectDefault) {
        this.mutiSelectDefault = mutiSelectDefault;
    }

    public String getReadOnly() {
        return readOnly;
    }

    public void setReadOnly(String readOnly) {
        this.readOnly = readOnly;
    }

    public String getSelfDefineValue() {
        return selfDefineValue;
    }

    public void setSelfDefineValue(String selfDefineValue) {
        this.selfDefineValue = selfDefineValue;
    }

    public String getSelfDefineName() {
        return selfDefineName;
    }

    public void setSelfDefineName(String selfDefineName) {
        this.selfDefineName = selfDefineName;
    }

    public String getSelfDefineValueEnd() {
        return selfDefineValueEnd;
    }

    public void setSelfDefineValueEnd(String selfDefineValueEnd) {
        this.selfDefineValueEnd = selfDefineValueEnd;
    }

    public Map<String, Boolean> getSelfDefineMultiSelect() {
        return selfDefineMultiSelect;
    }

    public void setSelfDefineMultiSelect(Map<String, Boolean> selfDefineMultiSelect) {
        this.selfDefineMultiSelect = selfDefineMultiSelect;
    }

    public String getSelfDefineSelect() {
        return selfDefineSelect;
    }

    public void setSelfDefineSelect(String selfDefineSelect) {
        this.selfDefineSelect = selfDefineSelect;
    }

    public String getFontColorByValue() {
        return fontColorByValue;
    }

    public void setFontColorByValue(String fontColorByValue) {
        this.fontColorByValue = fontColorByValue;
    }

    public String getFontColorByRow() {
        return fontColorByRow;
    }

    public void setFontColorByRow(String fontColorByRow) {
        this.fontColorByRow = fontColorByRow;
    }

    public String getFontColorByRange() {
        return fontColorByRange;
    }

    public void setFontColorByRange(String fontColorByRange) {
        this.fontColorByRange = fontColorByRange;
    }

    public String getMultiTreeMode() {
        return multiTreeMode;
    }

    public void setMultiTreeMode(String multiTreeMode) {
        this.multiTreeMode = multiTreeMode;
    }

    public String getDateDefault() {
        return dateDefault;
    }

    public void setDateDefault(String dateDefault) {
        this.dateDefault = dateDefault;
    }
}
